﻿@model IEnumerable<SchoolManagerMVC.Repository.EntityFramework.Student>

@{
    ViewBag.Title = "Students";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Students</h2>

@using (Html.BeginForm(new { action = "MultiDelete" }))
{
<table>
    <tr>   
        <th>
            FirstName
        </th>
        <th>
            LastName
        </th>
        <th>
            Age
        </th>
        <th>
            TuitionOwed
        </th>
        <th></th>
    </tr>

@foreach (var item in Model)
{
    <tr>
       
        <td>
            @Html.ActionLink(item.FirstName, "Details", new { id = item.UniqueID })
        </td>
        <td>
           @Html.ActionLink(item.LastName, "Details", new { id = item.UniqueID })
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Age)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TuitionOwed)
        </td>
        
        
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.UniqueID }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.UniqueID })
        </td>
    </tr>
}

</table>
}
<p>
    @Html.ActionLink("Create New", "Create")
</p>
